import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

@Schema()
export class Station {
  @Prop()
  initial: string;

  @Prop()
  name: string;

  @Prop()
  code: string;

  @Prop()
  fullPinyin: string;

  @Prop()
  shortPinyin: string;

  @Prop()
  sort: number;

  @Prop()
  areaNo: string;

  @Prop()
  areaName: string;
}

export type StationDocument = HydratedDocument<Station>;

export const StationSchema = SchemaFactory.createForClass(Station);
